$OpenBSD: patch-qt_poppler-page_cc,v 1.3 2013/08/15 18:40:20 kili Exp $
--- qt/poppler-page.cc.orig	Sat Aug  3 22:54:43 2013
+++ qt/poppler-page.cc	Sun Aug  4 23:07:10 2013
@@ -74,7 +74,10 @@ QImage Page::renderToImage(double xres, double yres, b
   SplashOutputDev *output_dev;
   SplashBitmap *bitmap;
   SplashColorPtr color_ptr;
+  XRef *xref;
+
   output_dev = data->doc->data->getOutputDev();
+  xref = data->doc->data->doc.getXRef(); // OMFG
 
   data->doc->data->doc.displayPageSlice(output_dev, data->index + 1, xres, yres,
       0, false, true, false, -1, -1, -1, -1);
@@ -104,7 +107,7 @@ QImage Page::renderToImage(double xres, double yres, b
   QImage img( dataPtr, bw, bh, 32, 0, 0, QImage::IgnoreEndian );
   img = img.copy();
   // unload underlying xpdf bitmap
-  output_dev->startPage( 0, NULL );
+  output_dev->startPage( 0, NULL, xref);
 
   return img;
 #else
@@ -124,7 +127,7 @@ QString Page::getText(const Rectangle &r) const
   QString result;
   ::Page *p;
   
-  output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse);
+  output_dev = new TextOutputDev(0, gFalse, 0, gFalse, gFalse);
   data->doc->data->doc.displayPageSlice(output_dev, data->index + 1, 72, 72,
       0, false, false, false, -1, -1, -1, -1);
   p = data->page;
@@ -155,7 +158,7 @@ QValueList<TextBox*> Page::textList() const
   
   QValueList<TextBox*> output_list;
   
-  output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse);
+  output_dev = new TextOutputDev(0, gFalse, 0, gFalse, gFalse);
 
   data->doc->data->doc.displayPageSlice(output_dev, data->index + 1, 72, 72,
       0, false, false, false, -1, -1, -1, -1);
@@ -239,7 +242,7 @@ QValueList<Link*> Page::links() const
   Links *xpdfLinks = data->doc->data->doc.getLinks(data->index + 1);
   for (int i = 0; i < xpdfLinks->getNumLinks(); ++i)
   {
-    ::Link *xpdfLink = xpdfLinks->getLink(i);
+    ::AnnotLink *xpdfLink = xpdfLinks->getLink(i);
     
     double left, top, right, bottom;
     int leftAux, topAux, rightAux, bottomAux;
